/* 博物馆文创页面样式 - 现代简约风格 */

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 页面主体样式 */
.museum-creative {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  background-color: #f8f9fa;
}

/* 顶部导航栏样式 */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  margin-bottom: 30px;
  background: linear-gradient(to right, #f9f9f9, #f3f0f7);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 10px 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* 购物车图标样式 */
.cart-icon {
  display: flex;
  align-items: center;
  position: relative;
  padding: 8px 12px;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.cart-icon:hover {
  background-color: rgba(156, 39, 176, 0.08);
}

.cart-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.cart-icon:hover .cart-img {
  transform: scale(1.1);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #e91e63;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(233, 30, 99, 0.3);
  border: 1.5px solid white;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.logo-text {
  margin-left: 10px;
  font-weight: 600;
  background: linear-gradient(45deg, #9c27b0, #673ab7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 32px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin-right: 20px;
  align-items: center;
}

.nav-item {
  margin: 0 25px;
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: #444;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 5px;
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.5px;
}

.nav-link:hover, .nav-link.active {
  color: #9c27b0;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #9c27b0, #e91e63);
  bottom: -5px;
  left: 0;
  transform: scaleX(1);
  transition: transform 0.3s ease, background 0.3s ease;
  border-radius: 3px;
}

.nav-link:hover::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #9c27b0, #e91e63);
  bottom: -5px;
  left: 0;
  transform: scaleX(1);
  border-radius: 3px;
}

/* 轮播图样式 */
.carousel {
  position: relative;
  height: 400px;
  margin-bottom: 40px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* 商品展示区域 */
.products-section {
  margin-bottom: 50px;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 25px;
  position: relative;
  padding-left: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  height: 24px;
  width: 5px;
  background-color: #9c27b0;
  border-radius: 3px;
}

.view-all {
  font-size: 14px;
  color: #9c27b0;
  text-decoration: none;
  display: flex;
  align-items: center;
  position: relative; /* 添加相对定位 */
  transition: all 0.3s ease; /* 添加过渡效果 */
}

.view-all:hover {
  color: #7b1fa2;
}

.view-all:hover::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #9c27b0, #e91e63);
  bottom: -5px;
  left: 0;
  transform: scaleX(1);
  border-radius: 3px;
}


.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

/* 商品卡片样式 */
.product-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.product-image-container {
  height: 200px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-details {
  padding: 15px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #e91e63;
  margin-bottom: 15px;
}

.add-to-cart {
  background-color: #9c27b0;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-to-cart:hover {
  background-color: #7b1fa2;
  transform: translateY(-2px);
}

.add-to-cart .icon {
  margin-right: 5px;
  font-size: 16px;
}

/* 商品详情页样式 */
.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product-gallery {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 15px;
}

.thumbnail-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.thumbnail:hover, .thumbnail.active {
  border-color: #9c27b0;
}

.product-info {
  flex: 1;
  min-width: 300px;
}

.product-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.product-description {
  color: #666;
  line-height: 1.6;
  margin: 20px 0;
}

.price-container {
  display: flex;
  align-items: baseline;
  margin-bottom: 20px;
}

.current-price {
  font-size: 28px;
  font-weight: 700;
  color: #e91e63;
  margin-right: 15px;
}

.original-price {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
}

.discount-tag {
  background-color: #e91e63;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 10px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.quantity-label {
  margin-right: 15px;
  font-weight: 500;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

.quantity-btn:hover {
  background-color: #f5f5f5;
}

.quantity-input {
  width: 50px;
  height: 36px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 16px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.buy-now {
  flex: 1;
  background-color: #e91e63;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buy-now:hover {
  background-color: #c2185b;
  transform: translateY(-2px);
}

.appraise-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.appraise {
  flex: 1;
  background-color: #18c24b;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.appraise:hover {
  background-color: #18c24b;
  transform: translateY(-2px);
}

.add-to-cart-detail {
  flex: 1;
  background-color: #9c27b0;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-to-cart-detail:hover {
  background-color: #7b1fa2;
  transform: translateY(-2px);
}

/* 用户评价部分 */
.reviews-section {
  margin-top: 40px;
}

.review-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.reviewer-info {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.reviewer-name {
  font-weight: 500;
}

.review-date {
  color: #999;
  font-size: 12px;
  margin-left: 10px;
}

.rating {
  display: flex;
  margin-bottom: 10px;
  color: #ffb400;
}

.review-text {
  color: #555;
  line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .nav-menu {
    display: none;
  }
  
  .carousel {
    height: 250px;
  }
  
  .product-detail {
    flex-direction: column;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalFadeScaleIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9c27b0;
} 

/* 评价窗口 */
.review-form {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 480px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
  padding: 30px 40px;
  z-index: 1001;
  animation: modalFadeScaleIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 遮罩层 */
.review-form::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(246, 246, 246, 0.7);
  z-index: -1;
  animation: fadeIn 0.4s ease forwards;
}

/* 标题 */
.review-form h3 {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 输入框 */
.review-form div {
  margin-bottom: 0;
}

.review-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 10px;
  color: #555;
  font-size: 15px;
}

/* 评分下拉框 */
.review-form select,
.review-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.2s ease-in-out;
  background-color: #fafafa;
  color: #333;
}

/* 下拉框箭头 */
.review-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

/* textarea */
.review-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* 聚焦效果 */
.review-form select:focus,
.review-form textarea:focus {
  border-color: #9c27b0;
  box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.15);
  outline: none;
}

/* 提交按钮 */
.review-form button[type="submit"] {
  background-color: #18c24b;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 20px;
  box-shadow: none;
  letter-spacing: 1px;
}

/* 提交按钮 Hover */
.review-form button[type="submit"]:hover {
  background-color: #0da73c;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* 关闭按钮 */
.review-form .close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.review-form .close-btn:hover {
  color: #333;
  transform: none;
  background: none;
}